import request from '@/utils/request';

const reportSampleApi = {};

reportSampleApi.markDataAnalysis = (id) => {
	return request({
		url: '/platform-api/seq-report-sample/mark-data-analysis/' + id,
		method: 'put',
	})
}
reportSampleApi.updateInputParam = (params) => {
	return request({
		url: '/platform-api/seq-report-sample/update-input-param',
		method: 'put',
    data: params,
	})
}
reportSampleApi.auditSample = (params) => {
	return request({
		url: '/platform-api/seq-report-sample/audit-sample',
		method: 'put',
    data: params,
	})
}
reportSampleApi.existSampleData = (id) => {
	return request({
		url: '/platform-api/seq-report-sample/check-data/' + id,
		method: 'get',
	})
}
reportSampleApi.parseReport = (id) => {
	return request({
		url: '/platform-api/seq-report-sample/parse/' + id,
		method: 'post',
	})
}
reportSampleApi.diff = (id) => {
	return request({
		url: '/platform-api/seq-report-sample/diff/' + id,
		method: 'get',
	})
}
reportSampleApi.uploadSampleReportNonFile = (id) => {
	return request({
		url: '/platform-api/seq-report-sample/upload-report-non-file/' + id,
		method: 'put',
	})
}
reportSampleApi.uploadFastqFile = (params) => {
	return request({
		url: '/platform-api/seq-report-sample/upload-fastq',
		method: 'put',
    data: params,
	})
}
reportSampleApi.setDfApplication = (id, applicationId, templateId) => {
	return request({
		url: '/platform-api/seq-sample-data/set-application/' + id + '?applicationId=' + applicationId + '&templateId=' + templateId,
		method: 'put',
	})
}
reportSampleApi.sendKafka = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/send-mq/' + id,
		method: 'put',
	})
}
reportSampleApi.addKv = (params) => {
	return request({
		url: '/platform-api/seq-sample-data/add-kv',
		method: 'put',
		data: params,
	})
}
reportSampleApi.uploadImage = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/upload-image/' + id,
		method: 'post',
	})
}
reportSampleApi.uploadCsv = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/upload-csv/' + id,
		method: 'post',
	})
}
reportSampleApi.downloadReport = (id) => {
	return request({
		url: '/platform-api/seq-sample-data/download-report/' + id,
		method: 'get',
		responseType: 'arraybuffer',
	})
}
reportSampleApi.syncSampleSystem = () => {
	return request({
		url: '/platform-api/seq-sample-data/sync-sample-new',
		method: 'get',
	})
}
reportSampleApi.reportSampleData = (params) => {
	return request({
		url: '/platform-api/seq-sample-data/page',
		method: 'post',
		data: params,
	})
}
reportSampleApi.list = () => {
	return request({
		url: '/platform-api/seq-sample-data/list-by-type/REPORT',
		method: 'get',
	})
}

reportSampleApi.getFileList = (sampleId) => {
	return request({
		url: '/platform-api/sample-file/list/' + sampleId,
		method: 'get',
	})
}

reportSampleApi.uploadReportSample = (sampleId) => {
	return request({
		url: '/platform-api/sample-file/upload/' + sampleId,
		method: 'post',
	})
}

reportSampleApi.publication = (params) => {
	return request({
		url: '/platform-api/publication/page',
		method: 'get',
        params: params,
	})
}

// 获取报告样本的文件树
reportSampleApi.getSampleFileTree = (id) => {
	return request({
		url: '/platform-api/seq-report-sample/file-tree/' + id,
		method: 'get',
	})
}

// 报告样本管理，查看-获取样本数据
reportSampleApi.getSampleData = (id) => {
	return request({
		url: '/platform-api/seq-report-sample/data/' + id,
		method: 'get',
	})
}

// 报告样本管理，查看-文件信息，查看
reportSampleApi.getFileStreamData = (id, path) => {
	return request({
		url: '/platform-api/seq-report-sample/file-stream/' + id + '?path=' + path,
		method: 'get',
        responseType: 'blob',
	})
}
export default reportSampleApi